﻿@using Huirui.Cavan.Domain.MainBoundedContext.PurchaseModule
@using Huirui.Cavan.Domain.MainBoundedContext.SystemModule
@model Huirui.Cavan.Presentation.ViewModel.PurchaseModule.IPurchaseOrderViewModel
<div id="mangePurchOrderWindow" class="easyui-window" data-options="closed:true,minimizable:false,maximizable:false,collapsible:false,title:'@Html.Raw("弹出窗口")',modal:true" style="width: 900px; height: 600px; padding: 2px;">
    @using (Html.BeginForm(ActionConst.LIST, ControllerConst.PURCHASEORDER))
    { 
        <div class="tool_bar">
            <input id="purchOrderManage_query" type="submit" value="query" style="display: none;" />
            <a href="#" id="queryPurchaseOrderManage" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-search'"
                onclick="javascript:$('#purchOrderManage_query').click()">查询</a>
            <a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-collapse'"
                onclick="toggleHeard()">折叠/展开</a>
        </div>
        <table class="form_heard">
            <tr>
                <td class="c100">
                    <label>
                        日期:</label>
                </td>
                <td class="c160">
                    @Html.TextBoxFor(m => m.SearchParam.StartDate, new { id = "purchOrderManageStartDate", style = "height:18px", @class = "Wdate", onfocus = "WdatePicker({minDate:'%y-%M-#{%d+1}'})" })
                </td>
                <td class="c30">
                    @Html.Label("至")
                </td>
                <td class="c160">
                    @Html.TextBoxFor(m => m.SearchParam.EndDate, new { id = "purchOrderManageEndDate", style = "height:18px", @class = "Wdate", onfocus = "WdatePicker({minDate:'%y-%M-#{%d+1}'})" })
                </td>
            </tr>
            <tr>
                <td class="c100">
                    <label>
                        供应商:</label>
                </td>
                <td class="c160">
                    @Html.TextBoxFor(m => m.SearchParam.SupplierCode)
                </td>
                <td colspan="2">
                    <input type="text" value="显示供应商名称" />
                </td>
            </tr>
            <tr>
                <td class="c100">
                    <label>
                        订单编号:</label>
                </td>
                <td colspan="3">
                    @Html.TextBoxFor(m => m.SearchParam.ID)
                </td>
            </tr>
            <tr>
                <td class="c100">
                    <label>
                        供应商发票号:</label>
                </td>
                <td colspan="3">
                    @Html.TextBoxFor(m => m.SearchParam.SupplierInvoiceNumber)
                </td>
            </tr>
            <tr>
                <td class="c100">
                    <label>
                        采购人员:</label>
                </td>
                <td class="c160">
                    @Html.TextBoxFor(m => m.SearchParam.PurchaseEmployeeCode)
                </td>
                <td colspan="2">
                    <input type="text" value="显示采购人员姓名" />
                </td>
            </tr>
            <tr>
                <td class="c100">
                    <label>
                        地点:</label>
                </td>
                <td colspan="3">
                    @Html.TextBoxFor(m => m.SearchParam.WareHouseCode)
                </td>
            </tr>
            <tr>
                <td class="c100">
                    <label>
                        审核状态:</label>
                </td>
                <td colspan="3">
                    <table class="form_heard">
                        <tr>
                            <td>
                                <input type="checkbox" name="checkedStatus" value="@SystemIdentifier.CheckedStatus.UnChecked.GetHashCode()" />
                            </td>
                            <td>@Html.Raw("未审核")
                            </td>
                            <td>
                                <input type="checkbox" name="checkedStatus" value="@SystemIdentifier.CheckedStatus.Pass.GetHashCode()" />
                            </td>
                            <td>@Html.Raw("通过")
                            </td>
                            <td>
                                <input type="checkbox" name="checkedStatus" value="@SystemIdentifier.CheckedStatus.Fail.GetHashCode()" />
                            </td>
                            <td>@Html.Raw("未通过")
                            </td>
                            <td>@Html.HiddenFor(m => m.SearchParam.CheckStatues, new { id = "checkedStatues" })
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td class="c100">
                    <label>
                        入库状态:</label>
                </td>
                <td colspan="3">
                    <table class="form_heard">
                        <tr>
                            <td>
                                <input type="checkbox" name="stockInStatus" value="@PurchaseIdentifier.StockInStatus.UnIn.GetHashCode()" />
                            </td>
                            <td>@Html.Raw("未入库")
                            </td>
                            <td>
                                <input type="checkbox" name="stockInStatus" value="@PurchaseIdentifier.StockInStatus.PartIn.GetHashCode()" />
                            </td>
                            <td>@Html.Raw("部分入库")
                            </td>
                            <td>
                                <input type="checkbox" name="stockInStatus" value="@PurchaseIdentifier.StockInStatus.AllIn.GetHashCode()" />
                            </td>
                            <td>@Html.Raw("已入库")
                            </td>
                            <td>
                                <input type="checkbox" name="stockInStatus" value="@PurchaseIdentifier.StockInStatus.Closed.GetHashCode()" />
                            </td>
                            <td>@Html.Raw("关闭")
                            </td>
                            <td>@Html.HiddenFor(m => m.SearchParam.StoskInStatues, new { id = "stockInStatues" })
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    }
    <table id="purchaseOrders" class="easyui-datagrid" title="采购订单列表" toolbar="purch_order_manage_tb">
    </table>
    <div id="purch_order_manage_tb">
        <a href="#" id="deleteBatchPurchOrder" class="easyui-linkbutton" iconcls="icon-delete-row"
            plain="true">批量删行</a>
    </div>
</div>
